//导入axios
import axios from "axios";
//创建axios实例
const requests = axios.create({
  baseURL: "/api",
  timeout: 5000,
  withCredentials: true,
  // headers: {
  //   "content-type": "application/x-www/form/urlencoded",
  // },
});

//拦截器
requests.interceptors.request.use(
  (config) => {
    return config;
  }
  // (error) => Promise.reject(error)
);

requests.interceptors.response.use(
  (response) => {
    return response;
  }
  // (error) => Promise.reject(error)
);

export default requests;
